


import 'dart:convert';

import 'package:flutter_my_web/net/BaseResponse.dart';

class GetHomeDataResponse extends BaseResponse{
  String? data;
  GetHomeJSONDataResponse? jsonDataResponse;
  @override
  fromJson(Map<String, dynamic>? json) {
    data = json?["data"].toString();
    Map<String, dynamic> news = jsonDecode(json?["data"]);
    jsonDataResponse = GetHomeJSONDataResponse().fromJson(news);
  }

  @override
  String toString() {
    return '$jsonDataResponse';
  }
}



class GetHomeJSONDataResponse extends BaseResponse{
  String? bg;
  GetHomeJSONDataTopdata? topdata = GetHomeJSONDataTopdata();
  List<GetHomeJSONDataBody>? body=[];
  @override
  fromJson(Map<String, dynamic>? json) {
    this.topdata = GetHomeJSONDataTopdata.fromJson(json?["topdata"]);
    List bodyList = json?["body"];
    this.bg = json?["bg"];
    body = [];
    bodyList.forEach((element) {
      body!.add(GetHomeJSONDataBody.fromJson(element));
    });
  }

  @override
  String toString() {
    return 'GetHomeJSONDataResponse{bg: $bg, topdata: $topdata, body: $body}';
  }
}

class GetHomeJSONDataTopdata {

  String? bg;

  String? textTitle;

  String? context;

  List<GetHomeJSONDataBanner>? banner=[];

  GetHomeJSONDataTopdata();

  GetHomeJSONDataTopdata.fromJson(Map<String, dynamic> srcJson){
    bg = srcJson["bg"];
    textTitle = srcJson["textTitle"];
    context = srcJson["context"];
    banner = [];
    List bodyList = srcJson["banner"];
    banner = [];
    bodyList.forEach((element) {
      banner!.add(GetHomeJSONDataBanner.fromJson(element));
    });
  }

  @override
  String toString() {
    return 'GetHomeJSONDataTopdata{bg: $bg, textTitle: $textTitle, context: $context, banner: $banner}';
  }
}


class GetHomeJSONDataBanner{

  String? type;

  String? content;
  String? bg;
  String? title;

  GetHomeJSONDataBanner();

  GetHomeJSONDataBanner.fromJson(Map<String, dynamic> srcJson){
    type = srcJson["type"];
    content = srcJson["content"];
    bg = srcJson["bg"];
    title = srcJson["title"];

  }

  @override
  String toString() {
    return 'GetHomeJSONDataBanner{type: $type, content: $content, bg: $bg, title: $title}';
  }
}


class GetHomeJSONDataBody {

  String? type;
  String? content;
  String? bg;
  String? title;
  GetHomeJSONDataBody();

  GetHomeJSONDataBody.fromJson(Map<String, dynamic> srcJson){
    type=srcJson["type"];
    content=srcJson["content"];
    bg = srcJson["bg"];
    title = srcJson["title"];
  }

  @override
  String toString() {
    return 'GetHomeJSONDataBody{type: $type, content: $content, bg: $bg, title: $title}';
  }
}


